{
    type Awaited1<T> = T extends Promise<string> ? string : T;

    // *在条件类型中，infer动态推断其数据类型
    type Awaited2<T> = T extends Promise<infer R> ? R : T;

    // 如果是此类型的话，需要递归：Promise<Promise<string>>

    type Awaited<T> = T extends Promise<infer R> ? Awaited<R> : T;

    interface User {
        name: string;
        age: number;
        sex: boolean;
        eat: () => void;
    }

    type testAwaited = Awaited<Promise<User>>;

    const user: testAwaited = {
        name: "ck",
        age: 18,
        sex: true,
        eat():void{
            
        }
        /*
        eat: (): void => {
            
        }
        */
    }
}